package com.skyaims.biz.util;

/**
 * Created by wujianing on 14-3-14.
 */
public class Converter {

    public static int bytesToInt(byte[] bytes) {

        int value = 0;

        for (int i = 0; i < bytes.length; i++) {

            int n = (bytes[i] < 0 ? (int) bytes[i] + 256 : (int) bytes[i]) << (8 * i);

            value += n;

        }

        return value;

    }

}
